package com.smmisia.article.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;

/**
 * feign远程调用接口
 */
@Component
@FeignClient(name = "oss-dev")
public interface OssService {

    @PostMapping(value = "/uploadFeign", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public HashMap<String, String> uploadFeign(@RequestPart("file") MultipartFile uploadFile);

    @PostMapping(value = "/qrcode", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public HashMap<String, String> qrcode(@RequestPart("file") MultipartFile uploadFile);
}